The present disclosure relates to image encoding methods and devices which are used in apparatuses which handle images, such as digital still cameras, network cameras, etc., in order to increase the rate of data transfer or reduce memory usage by image compression.
In recent years, as the number of pixels of an imaging element used in an imaging device, such as a digital still camera, a digital camcorder, etc., has increased, the amount of image data which is processed by an integrated circuit included in the device has also increased. In order to handle a large amount of image data, for example, the operating frequency or memory capacity may be increased to provide a sufficient bus width for data transfer in the integrated circuit. However, this leads directly to an increase in cost.
In the imaging device, such as a digital still camera, a digital camcorder, etc., after all image processing has been completed in the integrated circuit, the resulting data is typically recorded to an external recording device, such as an SD card etc. An image to be recorded is compressed before being recorded, whereby an image having a larger size or a larger number of images can be stored in an external recording device having the same capacity than without compression. The compression process is achieved by an encoding technique, such as JPEG, MPEG, etc.
Japanese Patent Publication No. 2007-228515 describes a technique of performing an image data compression process on a pixel signal (RAW data) input from an imaging element as well in order to reduce a bus band required during writing and reading of a memory and thereby achieve high-speed operation even when the imaging element has a larger number of pixels, i.e., the amount of signal processing increases. Also, a fixed-length encoding technique is employed to ensure the bus band and reduce the amount of the compression process. The fixed-length encoding of image data is implemented as follows: the largest and smallest values of pixel data in an arbitrary image region are calculated to obtain a local dynamic range in the region; and values obtained by subtracting the calculated smallest value from all pixels in the region are quantized using a quantization width corresponding to the obtained dynamic range.
Japanese Patent Publication No. 2007-036566 describes a technique of compressing RAW data to reduce memory usage and thereby increase the number of images which can be shot in a single burst, based on the fact that the number of images which can be shot in a single burst typically depends on the amount of RAW data which can be stored in a buffer memory. Also in Japanese Patent Publication No. 2007-036566, fixed-length encoding is employed to ensure a predetermined number of images which can be shot in a single burst. The fixed-length encoding is implemented as follow: a quantization width is determined based on a difference value between adjacent pixels, and an offset value uniquely obtained from the quantization width is subtracted from a pixel value to be compressed to determine a value to be quantized. Therefore, an image encoding device and an image decoding device are provided in which a compression process is achieved without the need of a memory while ensuring that the amount of an encoding process is low.
Also, Japanese Patent Publication No. 2007-104525 describes compression of RAW data, and relates to handling of defective pixels in an imaging element. Japanese Patent Publication No. 2007-104525 describes an image encoding device in which even when pixel data containing information indicating the presence of a defective pixel is input, the defective pixel is correctly detected and corrected in image processing at a succeeding stage. The image encoding device is implemented as follows: if a pixel is defective, the pixel is assigned to a specific representative quantized value, and otherwise, the pixel is assigned to a quantized value other than the specific representative quantized value, whereby information indicating the presence of a defective pixel can be reversibly encoded or decoded, and therefore, can be reliably recovered and correctly corrected in a process at a succeeding stage.